import { AbstractCommunity, COMMUNITY_TYPE, IAbstractCommunityOptions } from './abstract-community';
import { DefaultStage } from '../default-stage';
import { IVillageData } from '../../data/community';
import { CommunityData } from './community-data';
import { Mesh } from '@babylonjs/core';


interface IVillageOptions extends IAbstractCommunityOptions {
    //
}


class Village extends AbstractCommunity {

    constructor(stage: DefaultStage, options: IVillageOptions) {
        super(stage, options);
    }

    public get type(): COMMUNITY_TYPE {
        return COMMUNITY_TYPE.VILLAGE;
    }

    public get data(): IVillageData {
        return CommunityData.villageData[this.dataIndex];
    }

    protected initializePickMesh(): Mesh {
        const m = super.initializePickMesh();
        m.scaling.set(0.11, 0.06, 0.11);
        m.position.y = 0.03;
        m.visibility = 0;
        return m;
    }

}


export { Village };
export type { IVillageOptions };